<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:tiles="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<title tiles:string="title">home.html</title>

<meta name="keywords" content="keyword1,keyword2,keyword3" />
<meta name="description" content="this is my page" />
<meta name="content-type" content="text/html; charset=UTF-8" />

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

</head>

<body tiles:fragment="content">
	<div>
		Logged user: <span th:text="${#authentication.name}">Bob</span>
		Roles: <span th:text="${#authentication.authorities}">[ROLE_USER, ROLE_ADMIN]</span>
		<br/>
		Roles: <span sec:authentication="principal.authorities">[ROLE_USER, ROLE_ADMIN]</span>
		Name:  <span sec:authentication="name">Bob</span>
		<div sec:authorize="hasRole('ROLE_USER')">
		    This content is only shown to Message_Manage.
		</div>
	</div>
	<table border="1">
		<tr>
			<td>messageList</td>
			<td><a th:href="@{/messageList}">messageList</a></td>
		</tr>
		<tr>
			<td>AsyncController</td>
			<td><a th:href="@{async/do1}">Link</a></td>
		</tr>
		<tr>
			<td>Json</td>
			<td ><a th:each="v : ${#strings.arraySplit('1,2,3,4,5',',')}" th:href="@{'json/do'+ ${v}}" th:text="${'do'+v}"></a></td>
		</tr>
		<tr>
			<td>DownLoad PDF</td>
			<td><a th:href="@{'/download/pdf'(fileName='poyoyo')}">PDF Download:</a></td>
		</tr>
		<tr>
			<td>DownLoad Excel</td>
			<td><a th:href="@{'/download/excel'(fileName='eoyoyo')}">Excel Download:</a></td>
		</tr>
		<tr>
			<td>Flow(Welcome)</td>
			<td><a th:href="@{'/welcome'}">Welcome</a></td>
		</tr>
		<tr>
			<td>Flow(bookSearch)</td>
			<td><a th:href="@{'/bookSearch'}">bookSearch</a></td>
		</tr>
		<tr>
			<td>Flow(Shopping)</td>
			<td><a th:href="@{'/viewCart'}">Shopping</a></td>
		</tr>
		<tr>
			<td>exception</td>
			<td><a th:href="@{/exception/ex1(userId=1)}">exception1</a></td>
		</tr>
		<tr>
			<td>Thymeleaf Demo</td>
			<td><a th:href="@{/tl/do2}">do2</a>   <a th:href="@{/tl/do3}">do3</a></td>
		</tr>
	</table>
</body>
</html>
